{% extends "restricted/base.html" %}
{% load nm %}
{% load minechangelogs %}

{% block content %}

<h1>Minechangelogs query</h1>

<form action="{{request.build_absolute_uri}}" method="post">{% csrf_token %}
<table>
<tr>
    <td>
        {{form.query.label_tag}}:<br>
        {{form.query}}
    </td>
    <td>
        {{form.query.errors}}
        {{form.query.help_text}}
    </td>
</tr>
<tr>
    <td colspan="2">{{form.download}} {{form.download.label_tag}}</td>
</tr>
</table>
<input type="submit" value="Submit">
</form>

{% if entries %}
<h2>{{entries|length}} entries</h2>
<pre>
{% for e in entries %}
{{e|mc_format_entry:keywords}}
{% endfor %}
</pre>
{% endif %}

<table class="personinfo">
    <tr><th>Latest log entry seen:</th><td>{{info.max_ts}}</td></tr>
    <tr><th>Time of last indexing run:</th><td>{{info.last_indexed}}</td></tr>
</table>

{% endblock %}

